package com.lc1993929.actuator.starter.autoconfigure;

/**
 * Created by LiuChang on 2017/7/27/027.
 */

import com.lc1993929.actuator.starter.aop.LogMethodInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(LogProperties.class)
public class LogAutoConfiguration {

    private Logger logger = LoggerFactory.getLogger(LogAutoConfiguration.class);

    @Autowired
    private LogProperties logProperties;

    @Bean
    LogMethodInterceptor logMethodInterceptor() {
        LogMethodInterceptor logMethodInterceptor = new LogMethodInterceptor(logProperties.getExcludeArr());
        return logMethodInterceptor;
    }


}